package com.ruoyi.st.service.impl;

import com.ruoyi.st.domain.StCarousel;
import com.ruoyi.st.mapper.StCarouselMapper;
import com.ruoyi.st.service.IStCarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 轮播图Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-06
 */
@Service
public class StCarouselServiceImpl implements IStCarouselService 
{
    @Autowired
    private StCarouselMapper stCarouselMapper;

    /**
     * 查询轮播图
     * 
     * @param id 轮播图主键
     * @return 轮播图
     */
    @Override
    public StCarousel selectStCarouselById(Long id)
    {
        return stCarouselMapper.selectStCarouselById(id);
    }

    /**
     * 查询轮播图列表
     * 
     * @param stCarousel 轮播图
     * @return 轮播图
     */
    @Override
    public List<StCarousel> selectStCarouselList(StCarousel stCarousel)
    {
        return stCarouselMapper.selectStCarouselList(stCarousel);
    }

    /**
     * 新增轮播图
     * 
     * @param stCarousel 轮播图
     * @return 结果
     */
    @Override
    public int insertStCarousel(StCarousel stCarousel)
    {
        return stCarouselMapper.insertStCarousel(stCarousel);
    }

    /**
     * 修改轮播图
     * 
     * @param stCarousel 轮播图
     * @return 结果
     */
    @Override
    public int updateStCarousel(StCarousel stCarousel)
    {
        return stCarouselMapper.updateStCarousel(stCarousel);
    }

    /**
     * 批量删除轮播图
     * 
     * @param ids 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteStCarouselByIds(Long[] ids)
    {
        return stCarouselMapper.deleteStCarouselByIds(ids);
    }

    /**
     * 删除轮播图信息
     * 
     * @param id 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteStCarouselById(Long id)
    {
        return stCarouselMapper.deleteStCarouselById(id);
    }
}
